< previous page page_462 next page >

Page 462
Table 12.2. continued
ControlsPropertiesSettings
DataSourcedtaDestination
DataFieldStateCode
Height300
Left1440
Top120
Width1200
LabelNameLabel2
BorderStyle1 Fixed Single
DataSourcedtaDestination
DataFieldNameID
Height300
Left1440
Top540
Width1200

0462-01.jpg
Figure 12.7.
Laying out the
COMBO.VBP project.
You need to add two lines of code to the project before it's complete. The following lines force Visual Basic 5 to update the form controls as soon as the user makes a selection in the combo box:
Private Sub DBCombo1_Click(Area As Integer)
    Label1 = DBCombo1.BoundText
End Sub

Private Sub DBCombo2_Click(Area As Integer)
    Label2 = DBCombo2.BoundText
End Sub
Save the form as COMBO.FRM and the project as COMBO.VBP. Now run the project and check your screen against the one in Figure 12.8.

 
< previous page page_462 next page >

If you like this book, buy it!